clear;
%% Connect
osc = EquipmentControl.Oscilloscope.KeysightDSOX2024('USB0::0x0957::0x17A0::MY56310380::0::INSTR');

%% Basic Setting
osc.setVerticalCoupling(1, 'DC')
osc.setVerticalRange(2, 0.1);

osc.setVerticalOffset(3, 0.0);
osc.clearWaveform;
% clc;
% [timelist, signal, names] = osc.getWaveform('channel', [3 4]);
% plot(timelist, signal);
% legend(names);

osc.snapShot('data');
%% Interactive Display/Store Waveform
osc.showWaveform([1 2 3]);


%% Continuous Store Waveform
figure;
for k = 1:10
    [t, wfm]  = osc.getWaveform([1 3], 'store', true);
    plot(t, wfm);
    pause(1);
end

